home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Sound / Utilities / ST201MusicDrivers Folder / Music Drivers / 'PSyn' Glue.c next >
Text File  |  1993-12-05  |  2KB  |  65 lines

  1.  
  2. /* 'Psyn' Glue.c - Glue for 'PSTk' 128 resource calls */
  3.  
  4. /* Copyright (c) 1991-93 by Frank Seide, Wirichsbongardstr. 43, D-52062 Aachen, Germany */
  5.  
  6. #define GoPSynDispatcher(sel){\
  7.     asm{pea (sel)}\
  8.     asm{bra PSynJump}\
  9. }
  10.  
  11. void PSynJump()
  12. {
  13.     extern PSynDispatcher();
  14.     asm {
  15. #ifdef NO_RESOURCES
  16.         move.l        (a7)+,d0
  17.         jmp        PSynDispatcher
  18. #else
  19.         move.l        #0,-(a7)
  20.         move.l        #'PSTk',-(a7)
  21.         move.w        #128,-(a7)
  22.         _GetResource
  23.         move.l        (a7)+,a0
  24.         move.l        a0,d0
  25.         bne            @OK
  26.         move.w        #25,d0
  27.         _SysError
  28. @OK    move.l        (a0),a0
  29.         move.l        (a7)+,d0
  30.         jmp        (a0)
  31. #endif
  32.     }
  33. }
  34.  
  35. /*** Functions: ***/
  36.  
  37. void PChannelVersion() GoPSynDispatcher(0)
  38. void CheckPChannel() GoPSynDispatcher(1)
  39. void StopPChannel() GoPSynDispatcher(2)
  40. void ClosePChannel() GoPSynDispatcher(3)
  41. void ResetPChannel() GoPSynDispatcher(4)
  42. void OpenPChannel() GoPSynDispatcher(5)
  43. void StartPChannel() GoPSynDispatcher(6)
  44. void StereoPChannel() GoPSynDispatcher(7)
  45. void PChannelVolume() GoPSynDispatcher(8)
  46. void PChannelPosition() GoPSynDispatcher(9)
  47. void GetPChannelRecord() GoPSynDispatcher(10)
  48. void GetPChannelSignalPower() GoPSynDispatcher(11)
  49. void ReadPChannel() GoPSynDispatcher(12)
  50. void PChannelCopyright() GoPSynDispatcher(13)
  51. void PChannelBits() GoPSynDispatcher(14)
  52.  
  53. /*** Credits: ***/
  54.  
  55. void PSynCopr()        /* This string must *NOT* be removed! */
  56. {
  57.     asm {
  58.         dc.b    "*** 'PSTk' resource stub V2.0.1, 12/05/93, "
  59.         dc.b    "resource and stub "
  60.         dc.b    "copyright (c) 1991-93 by Frank Seide, Wirichsbongardstr. 43, "
  61.         dc.b    "D-52062 Aachen, Germany *** "
  62.         dc.b    "This message must not be changed or removed."
  63.     }
  64. }
  65.